<?php

$t_data = IsNew($GL, $_GET['new']);
if ($t_data) {
    if ($_POST["check_yes"] != "yes") {
        $t_tpl = GetTpl("accept");
        $msg = "Удалить новость <b>" . $t_data["title"] . "</b>?";
        $t_tpl = str_replace("{msg}", $msg, $t_tpl);
        $t_title = "Удаление новости";
        $HEADER .=" - ".$t_title;
        $t_BODY = $t_tpl;
    }
    else {
        DelNew($GL, $_GET['new']);
        Logger($LogFile, "ADMIN DEL NEW (" . $t_data["title"] .")");
        header("Location: http://" . $SITE . "/?action=addnew");
    }
}
else {
     header("Location: http://" . $SITE . "/?action=news");
}

?>
